<?php
@ob_start();
@session_start();

include("../connect/connect.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>-</title>
<link rel="stylesheet" href="stylereport.css" type="text/css" />
<link rel="shortcut icon" href="../image/Letter-T.ico" />
</head>
<?php

if($_GET['action']=='endsale') {
	mysql_query("DELETE FROM sale_report2");
	mysql_query("DELETE FROM debtor_report_session");
	$abc = "ปิดการขายเรียบร้อยแล้ว";
		$wait = "อีก 5 วินาทีจะกลับไปสู่หน้าแรกอีกครั้ง";
	echo "<script type=\"text/javascript\"> setTimeout(\"location.href='../sale/index.php'; \", 5000);</script>";
}
?>
<body>
<font size="6" color="red"><center><?php echo $abc; ?></center></font>
<br />
<font size="5" color="red"><center><?php echo $wait; ?></center></font>
</body>

</html>
